package org.xp.judgeplatform.util;

/**
 * Redis key常量类
 */
public class RedisKeyConstants {
    // 临时邀请码 invite:temp:TEMP-ABC12345
    public static final String TEMP_INVITE_PREFIX = "invite:temp:";

    public static String getTempInviteKey(String tempInviteCode){
        return TEMP_INVITE_PREFIX + tempInviteCode;
    }

    // 临时邀请码有效期（秒）
    public static final long ONE_HOUR = 3600L;
    public static final long ONE_DAY = 86400L;
    public static final long SEVEN_DAYS = 604800L;

    public static final long MIN_DURATION = ONE_HOUR;      // 最小1小时
    public static final long MAX_DURATION = SEVEN_DAYS;    // 最大7天
    public static final long DEFAULT_DURATION = ONE_DAY;   // 默认24小时
}
